<?php

include("../utility/connection.php");
include("../model/mPaper.php");
session_start();

$Num = trim(mysql_real_escape_string($_POST["hidNum"]));

$UserId = trim(mysql_real_escape_string($_POST["hidUserId_".$Num]));
$SeminarId = trim(mysql_real_escape_string($_POST["hidSeminarId_".$Num]));
$PaperId = trim(mysql_real_escape_string($_POST["hidPaperId_".$Num]));
$Komen = trim(mysql_real_escape_string($_POST["txtKomen_".$Num]));
$Score = trim(mysql_real_escape_string($_POST["txtScore_".$Num]));

$ReviewerId = trim(mysql_real_escape_string($_POST["hidIdReviewer"]));

//$result = fnSaveRemark($PaperId, $UserId, $SeminarId, $Komen);
//if ($result) {
    $result1 = fnSaveScore($PaperId, $ReviewerId, $Score, $Komen);
    if ($result1) {
        $message="Successfully Added!";
        $_SESSION['message']=$message;
        header("location: ../ui/reviewer/review.php");
    } else {
        $message="Fail to Save Score!";
        $_SESSION['message']=$message;
        header("location: ../ui/reviewer/review.php");
    }
//} else {
//    $message="Fail to Save Remark!";
//    $_SESSION['message']=$message;
//    header("location: ../ui/reviewer/review.php");
//}

?>
